// pages/99gift/store.js
Page({

    /**
     * 页面的初始数据
     */
    data: {
        store: [{
                img: "/images/store1.png",
                name: "尼克斯品汽车管家",
                address: "新店镇 翔舞村宋坂77号之315号",
                distance: "12.3km",
                phonenum: "1345445454"
            },
            {
                img: "/images/store1.png",
                name: "尼克斯品汽车管家",
                address: "新店镇 翔舞村宋坂77号之315号",
                distance: "12.3km",
                phonenum: "1845445454"
            },
            {
                img: "/images/store1.png",
                name: "尼克斯品汽车管家",
                address: "新店镇 翔舞村宋坂77号之315号",
                distance: "12.3km",
                phonenum: "15451111111"
            },
            {
                img: "/images/store1.png",
                name: "尼克斯品汽车管家",
                address: "新店镇 翔舞村宋坂77号之315号",
                distance: "12.3km",
                phonenum: "17845696554"
            },
            {
                img: "/images/store1.png",
                name: "尼克斯品汽车管家",
                address: "新店镇 翔舞村宋坂77号之315号",
                distance: "12.3km",
                phonenum: "1545445454"
            },
            {
                img: "/images/store1.png",
                name: "尼克斯品汽车管家",
                address: "新店镇 翔舞村宋坂77号之315号",
                distance: "12.3km",
                phonenum: "1545445454"
            }
        ],
    },

    /**
     * 生命周期函数--监听页面加载
     */
    onLoad: function(options) {

    },

    /**
     * 生命周期函数--监听页面初次渲染完成
     */
    onReady: function() {

    },

    /**
     * 生命周期函数--监听页面显示
     */
    onShow: function() {

    },

    /**
     * 生命周期函数--监听页面隐藏
     */
    onHide: function() {

    },
	godetails:function(){
		wx.navigateTo({
			url: '/pages/carstore/storedetails',
		})
	},
    makephonecall: function(e) {
        var temp = this.data.store
		var index=e.currentTarget.dataset.index
		var phone = temp[index].phonenum
        wx.makePhoneCall({
			phoneNumber: phone,
		})
    }
})